package cn.xzzz2020.demo.aspect.Mock;

import cn.xzzz2020.XJynWeb.aop.annotation.Aspect;
import cn.xzzz2020.XJynWeb.aop.annotation.Order;
import cn.xzzz2020.XJynWeb.aop.aspect.DefaultAspect;
import lombok.extern.slf4j.Slf4j;

import java.lang.reflect.Method;

/**
 * @author xzzz2020
 * @version 1.0
 * @date 2020/9/10 11:40
 */
@Aspect(pointcut = "execution(* cn.xzzz2020.demo.controller.ShopCategoryController.*(..))")
@Order(5)
@Slf4j
public class ControllerAspect5 extends DefaultAspect {
    @Override
    public void before(Class<?> targetClass, Method method, Object[] args) throws Throwable {
        log.info("执行了前置方法，我是切面5~");
    }

    public Object afterReturning(Class<?> targetClass, Method method, Object[] args, Object returnValue) throws Throwable{
        log.info("执行了后置方法，我是切面5~");
        return returnValue;
    }
}
